<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib uri="/tags/struts-logic" prefix="logic"%>
<html:html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>客户信息管理</title>
	<META http-equiv=Pragma content=no-cache>
	<META http-equiv=Cache-Control content=no-cache>
	<META http-equiv=Expires content=0>
	<link rel="stylesheet"
		href="<%=request.getContextPath()%>/resource/css/style.css"
		type="text/css">
	<script language="javascript" type="text/javascript"
		src="<%=request.getContextPath()%>/resource/js/util.js"></script>
	<script language="javascript" type="text/javascript"
		src="<%=request.getContextPath()%>/style/scripts/util.js"></script>
	<script language="javascript" type="text/javascript"
		src="<%=request.getContextPath()%>/resource/js/Validator.js"></script>
	<script language="javascript" type="text/javascript"
		src="<%=request.getContextPath()%>/resource/calendar/DCDA_C03.js"></script>
	<%------------- -----------------------------------动态加载start----------------------------------------------------------------------%>
	<script language="javascript" type="text/javascript"
		src="<%=request.getContextPath()%>/resource/js/AdyhUtil.js"></script>
	<script type="text/javascript"
		src="<%=request.getContextPath()%>/style/ext/adapter/ext/ext-base.js"></script>
	<script type="text/javascript"
		src="<%=request.getContextPath()%>/style/ext/ext-all.js"></script>
	<%------------------------------------------------动态加载end----------------------------------------------------------------------%>
	<script>
	
		//------------------------------------------------动态加载start---------------------------------------------------------------------- 
//动态加载 
function FiltSupplier(obj)
  {  	//
  		var strValue = Jtrim(obj.value);   
		if(strValue==""){//检索条件为空时，不检索




			return ;
		}
		if(event.keyCode==38||event.keyCode==40||event.keyCode==13){
			keyEnter();
			if(numsup>=0&&(event.keyCode==38||event.keyCode==40)){
				document.getElementById("row"+numsup).focus();
				document.getElementById("row"+numsup).scrollIntoView(false);
			}
			return;
		}
  		
		var strId =  obj.name;
		  
		//回显的编码的字段名称
		var strCode = "";
		//回显的名称的字段名称
		var strName = "";
		//相应的div的名称




		var strObj = "rtnList";
		
		strTextName=strId
		
		strCode = "customer_code";
		strName = "customer_name";
		
   		Ext.Ajax.request(
   		{
		url : 'F010102.do' , 
		params : {operationType:'ajax',name:strValue},
		method: 'POST',
		success: function ( result, request) 
			{
			var listArray = new Array();
			var obj= Ext.decode(result.responseText) ;
			var objPrompt = document.getElementById(strObj);
			
			objPrompt.style.display = "block";				
							
			initPosition(strObj);
			listArray = obj.data.list;
			
			objPrompt.innerHTML = "<iframe style=\"position: absolute; z-index: -1; width: 100%; height: 100%; top: 0;left: 0; scrolling: no;\" frameborder=\"0\" src=\"about:blank\"></iframe>";
			var height = listArray.length*24;
			if(height>=240){
				height=240;
			}
			//alert(height);
			objPrompt.style.height = height;
			
			var inn = "<table WIDTH=\"100%\" BORDER=\"0\" CELLSPACING=\"1\" CELLPADDING=\"1\" bgcolor=\"#FFFFFF\" id=\"sup\" class=\"ListBackground\">";
 	        for (i=0; i<listArray.length; i++){
				inn += "<tr class=\"ListRow1\" height=\"20\" id=\"row"+(i)+"\"  onClick=\"javascript:show('"+strObj+"','"+listArray[i][0]+"','"+strCode+"','"+listArray[i][1]+"','"+strName+"')\">";
				inn += "<td>";
				inn += listArray[i][1];
				inn += "</td>";
				inn += "</tr>";
			}
			inn+="</table>";
			
			rownum=i;//获取动态加载的行数
			
			//若检索的结果是空，关闭div
			if(listArray.length==1&&listArray[0][0]==""&&listArray[0][1]==""){
				inn = "";
			}
			
			objPrompt.innerHTML += inn;
			if(rownum>0&&inn!=""){
				document.getElementById("row0").focus();
			}
			FocusTableRow1("sup",0);//鼠标划过变色
			setPosition(strObj,strName);	//设置div的位置	
			document.getElementById(strCode).value="";
			},	
		failure: function ( result, request) { 
			alert("<bean:message key="F020106.title"/>");
			} 
		}
		);
  }

//初始化div的位置




  function initPosition(strObj){
	var objPrompt = document.getElementById(strObj);
	objPrompt.style.top=0;
	objPrompt.style.left=0;
  }
  
  //设置div的位置




  function setPosition(strObjPrompt,strObjText){
  	var objPrompt = document.getElementById(strObjPrompt);
	var objText = document.getElementById(strObjText);
	objPrompt.style.top = 20-(objPrompt.offsetTop-objText.offsetTop);
	objPrompt.style.left = objText.offsetLeft-18;
  }
  
  //设置div的位置




  function initColumn(){
  	strCode = "customer_code";
	strName = "customer_name";
	document.getElementById(strCode).value = "";
	document.getElementById(strName).value = "";
  }
  

//------------------------------------------------动态加载end---------------------------------------------------------------------- 


/**保存*/
function ShowAlert()
{ResetMe();
	var cotract_number = document.getElementById("cotract_number").value;
	var signaure_date = document.getElementById("signaure_date").value;
	var manufacturing_order = document.getElementById("manufacturing_order").value;
	var model = document.getElementById("model").value;
	var description = document.getElementById("description").value;
	var quantity = document.getElementById("quantity").value;
	var VAT = document.getElementById("VAT").value;
	var unit_price = document.getElementById("unit_price").value;
	var total_price = document.getElementById("total_price").value;
	var transport = document.getElementById("transport").value;
	var commission = document.getElementById("commission").value;
	var customer_delivery_date = document.getElementById("customer_delivery_date").value;
	var payment_terms = document.getElementById("payment_terms").value;
	var customer_code = document.getElementById("customer_name").value;
	var area = document.getElementById("area").value;
	var saleman_code = document.getElementById("saleman_code").value;
	var passing_date = document.getElementById("passing_date").value;
	var area_group = document.getElementById("area_group").value;
	var customer_type = document.getElementById("customer_type").value;
	var product_type = document.getElementById("product_type").value;
	var own_production= document.getElementById("own_production").value;
	
	var objPrompt = document.getElementById("divPrompt");
    objPrompt.style.display = "block";
    objPrompt.innerHTML = "";
	if(cotract_number.length==0||signaure_date.length==0||manufacturing_order.length==0||model.length==0
	 ||description.length==0||quantity.length==0||VAT.length==0||unit_price.length==0
	 ||total_price.length==0||transport.length==0||commission.length==0
	 ||customer_delivery_date.length==0||payment_terms.length==0
	 ||customer_code.length==0||area.length==0||saleman_code.length==0
	 ||passing_date.length==0||area_group.length==0||customer_type.length==0
	 ||product_type.length==0||own_production.length==0
	 ||!check_naturalnumber(unit_price)
	 ||!check_naturalnumber(quantity)
	 ||!check_naturalnumber(transport)
	 ||!check_naturalnumber(commission)){
	 	if(cotract_number.length==0){
			objPrompt.innerHTML += "<li><bean:message key="F010102.cotract_number"/><bean:message key="F01.errerNull"/>!";
			document.getElementById("cotract_number").className = "MyControlError";
			if(check_number(cotract_number)){
				objPrompt.innerHTML += "<li><bean:message key="F010102.cotract_number"/><bean:message key="F01.errerFormat"/>!";
				document.getElementById("cotract_number").className = "MyControlError";
			}
		}
		if(cotract_number.length!=0){
			if(!check_naturalnumber(cotract_number)){
				objPrompt.innerHTML += "<li><bean:message key="F010102.cotract_number"/><bean:message key="F01.errerFormat"/>!";
				document.getElementById("cotract_number").className = "MyControlError";
			}
		}
		if(signaure_date.length==0){
			objPrompt.innerHTML += "<li><bean:message key="F010102.signaure_date"/><bean:message key="F01.errerNull"/>!";
			document.getElementById("signaure_date").className = "MyControlError";
		}
		if(manufacturing_order.length==0){
			objPrompt.innerHTML += "<li><bean:message key="F010102.manufacturing_order"/><bean:message key="F01.errerNull"/>!";
			document.getElementById("manufacturing_order").className = "MyControlError";
		}
		if(manufacturing_order.length!=0){
			if(!check_naturalnumber(manufacturing_order)){
				objPrompt.innerHTML += "<li><bean:message key="F010102.manufacturing_order"/><bean:message key="F01.errerFormat"/>!";
				document.getElementById("manufacturing_order").className = "MyControlError";
			}
		}
		if(cotract_number.length!=0&&manufacturing_order.length!=0){
			JudgmentSample();
			falg = document.getElementById("falg").value;
			if(falg=="1"){
				objPrompt.innerHTML += "<li><bean:message key="F01.errerRepeated" />!";
				document.getElementById("cotract_number").className = "MyControlError";
				document.getElementById("manufacturing_order").className = "MyControlError";
			}else if(falg=="0"){
				document.getElementById("cotract_number").className = "MyText";
				document.getElementById("manufacturing_order").className = "MyText";
			}
		}
		if(model.length==0){
			objPrompt.innerHTML += "<li><bean:message key="F010102.model"/><bean:message key="F01.errerNull"/>!";
			document.getElementById("model").className = "MyControlError";
		}
		if(description.length==0){
			objPrompt.innerHTML += "<li><bean:message key="F010102.description"/><bean:message key="F01.errerNull"/>!";
			document.getElementById("description").className = "MyControlError";
		}
		if(quantity.length==0){
			objPrompt.innerHTML += "<li><bean:message key="F010102.quantity"/><bean:message key="F01.errerNull"/>!";
			document.getElementById("quantity").className = "MyControlError";
		}
		if(quantity.length!=0){
			if(!check_naturalnumber(quantity)){
				objPrompt.innerHTML += "<li><bean:message key="F010102.quantity"/><bean:message key="F01.errerFormat"/>!";
				document.getElementById("quantity").className = "MyControlError";
			}
		}
		if(VAT.length==0){
			objPrompt.innerHTML += "<li><bean:message key="F010102.VAT"/><bean:message key="F01.errerNull"/>!";
			document.getElementById("VAT").className = "MyControlError";
		}
		if(VAT.length!=0){
			if(isNumber(VAT)){
				objPrompt.innerHTML += "<li><bean:message key="F010102.VAT"/><bean:message key="F01.errerFormat"/>!";
				document.getElementById("VAT").className = "MyControlError";
			}
		}
		if(unit_price.length==0){
			objPrompt.innerHTML += "<li><bean:message key="F0102.unit_price"/><bean:message key="F01.errerNull"/>!";
			document.getElementById("unit_price").className = "MyControlError";
		}
		if(unit_price.length!=0){
			if(!check_naturalnumber(unit_price)){
				objPrompt.innerHTML += "<li><bean:message key="F0102.unit_price"/><bean:message key="F01.errerFormat"/>!";
				document.getElementById("unit_price").className = "MyControlError";
			}
		}
		if(total_price.length==0){
			objPrompt.innerHTML += "<li><bean:message key="F0102.total_price"/><bean:message key="F01.errerNull"/>!";
			document.getElementById("total_price").className = "MyControlError";
		}
		if(transport.length==0){
			objPrompt.innerHTML += "<li><bean:message key="F010102.transport"/><bean:message key="F01.errerNull"/>!";
			document.getElementById("transport").className = "MyControlError";
		}
		if(transport.length!=0){
			if(!check_naturalnumber(transport)){
				objPrompt.innerHTML += "<li><bean:message key="F010102.transport"/><bean:message key="F01.errerFormat"/>!";
				document.getElementById("transport").className = "MyControlError";
			}
		}
		if(commission.length==0){
			objPrompt.innerHTML += "<li><bean:message key="F010102.commission"/><bean:message key="F01.errerNull"/>!";
			document.getElementById("commission").className = "MyControlError";
		}
		if(commission.length!=0){
			if(!check_naturalnumber(commission)){
				objPrompt.innerHTML += "<li><bean:message key="F010102.commission"/><bean:message key="F01.errerFormat"/>!";
				document.getElementById("commission").className = "MyControlError";
			}
		}
		if(customer_delivery_date.length==0){
			objPrompt.innerHTML += "<li><bean:message key="F0102.customer_delivery_date"/><bean:message key="F01.errerNull"/>!";
			document.getElementById("customer_delivery_date").className = "MyControlError";
		}
		if(payment_terms.length==0){
			objPrompt.innerHTML += "<li><bean:message key="F010102.payment_terms"/><bean:message key="F01.errerNull"/>!";
			document.getElementById("payment_terms").className = "MyControlError";
		}
		if(customer_code.length==0){
			objPrompt.innerHTML += "<li><bean:message key="F010102.customer_code"/><bean:message key="F01.errerNull"/>!";
			document.getElementById("customer_code").className = "MyControlError";
		}
		if(area.length==0){
			objPrompt.innerHTML += "<li><bean:message key="F010102.area"/><bean:message key="F01.errerNull"/>!";
			document.getElementById("area").className = "MyControlError";
		}
		if(saleman_code.length==0){
			objPrompt.innerHTML += "<li><bean:message key="F010102.saleman_code"/><bean:message key="F01.errerNull"/>!";
			document.getElementById("saleman_code").className = "MyControlError";
		}
		if(passing_date.length==0){
			objPrompt.innerHTML += "<li><bean:message key="F010102.passing_date"/><bean:message key="F01.errerNull"/>!";
			document.getElementById("passing_date").className = "MyControlError";
		}
		if(area_group.length==0){
			objPrompt.innerHTML += "<li><bean:message key="F010102.area_group"/><bean:message key="F01.errerNull"/>!";
			document.getElementById("area_group").className = "MyControlError";
		}
		if(customer_type.length==0){
			objPrompt.innerHTML += "<li><bean:message key="F010102.customer_type"/><bean:message key="F01.errerNull"/>!";
			document.getElementById("customer_type").className = "MyControlError";
		}
		if(product_type.length==0){
			objPrompt.innerHTML += "<li><bean:message key="F010102.product_type"/><bean:message key="F01.errerNull"/>!";
			document.getElementById("product_type").className = "MyControlError";
		}
		if(own_production.length==0){
			objPrompt.innerHTML += "<li><bean:message key="F010102.own_production"/><bean:message key="F01.errerNull"/>!";
			document.getElementById("own_production").className = "MyControlError";
		}
		
	}else{
		JudgmentSample();
		var falg = document.getElementById("falg").value;
		var bank_guaranty = document.getElementById("bank_guaranty").value;
		if(falg=="0"){
			if(bank_guaranty=="0"){
				document.getElementById("bond_date").value="";
				document.getElementById("bond_value").value="";
			}else{
				var bond_date = document.getElementById("bond_date").value;
				var bond_value = document.getElementById("bond_value").value;
				if(bond_date.length==0){
					objPrompt.innerHTML += "<li><bean:message key="F010102.bond_date"/><bean:message key="F01.errerNull"/>!";
					document.getElementById("bond_date").className = "MyControlError";
					return ;
				}
				if(bond_value.length==0){
					objPrompt.innerHTML += "<li><bean:message key="F010102.bond_value"/><bean:message key="F01.errerNull"/>!";
					document.getElementById("bond_value").className = "MyControlError";
					return ;
				}
				if(bond_value.length!=0){
					if(!check_naturalnumber(bond_value)){
						objPrompt.innerHTML += "<li><bean:message key="F010102.bond_value"/><bean:message key="F01.errerFormat"/>!";
						document.getElementById("bond_value").className = "MyControlError";
						return ;
					}
				}
			}
		var operationType = document.getElementById("operationType").value;
		operation(operationType);
		}else{
			objPrompt.innerHTML += "<li>订单号对应工作号重复！";
			document.getElementById("own_production").className = "MyControlError";
		}
	}
}
/**重置*/
function ResetMe()
{
	document.getElementById("cotract_number").className = "MyText";
	document.getElementById("signaure_date").className = "MyText";
	document.getElementById("manufacturing_order").className = "MyText";
	document.getElementById("model").className = "MyText";
	document.getElementById("description").className = "MyText";
	document.getElementById("quantity").className = "MyText";
	document.getElementById("VAT").className = "MyText";
	document.getElementById("unit_price").className = "MyText";
	document.getElementById("total_price").className = "MyText";
	document.getElementById("transport").className = "MyText";
	document.getElementById("commission").className = "MyText";
	document.getElementById("customer_delivery_date").className = "MyText";
	document.getElementById("payment_terms").className = "MyText";
	document.getElementById("bank_guaranty").className = "MyText";
	document.getElementById("bond_date").className = "MyText";
	document.getElementById("bond_value").className = "MyText";
	document.getElementById("customer_code").className = "MyText";
	document.getElementById("area").className = "MyText";
	document.getElementById("saleman_code").className = "MyText";
	document.getElementById("passing_date").className = "MyText";
	document.getElementById("area_group").className = "MyText";
	document.getElementById("customer_type").className = "MyText";
	document.getElementById("product_type").className = "MyText";
	document.getElementById("own_production").className = "MyText";
	var objPrompt = document.getElementById("divPrompt");
    objPrompt.style.display = "none";
	objPrompt.innerHTML = "";
}
/**是否担保*/
function chack_bank_guaranty(){
	var bank_guaranty = document.getElementById("bank_guaranty").value;
	if(bank_guaranty=="0"){
		document.forms[0].bond_date.disabled=true;
		document.forms[0].bond_value.disabled=true;
	}else{
		document.forms[0].bond_date.disabled=false;
		document.forms[0].bond_value.disabled=false;
	}
}
/**选择税率*/
function chack_customer_type(){
	var customer_type = document.getElementById("customer_type").value;
	if(customer_type=="5"){
		document.forms[0].VAT.value="0";
	}else{
		document.forms[0].VAT.value="17";
	}
}
/**
 *@验证订单号和工作号是否重复







 */
function JudgmentSample(){
	var operationType = document.getElementById("operationType").value;
	var originally_manufacturing_order;
	var manufacturing_order;
	if(operationType=="update"){
		originally_manufacturing_order = document.getElementById("originally_manufacturing_order").value;
		manufacturing_order = document.getElementById("manufacturing_order").value;
		if(originally_manufacturing_order!=manufacturing_order){
			Sample();
		}else{
			document.getElementById("falg").value="0";
		}
	}
	if(operationType=="insert"){
		Sample();
	}
}
function Sample(){
  	var manufacturing_order = document.forms[0].manufacturing_order.value;
  		Ext.Ajax.request({
			url : 'F010102.do' , 
			params : {operationType:'check',manufacturing_order:manufacturing_order},
			method: 'POST',
			success: function ( result, request) {
				var obj= Ext.decode(result.responseText) ;
				var falg = obj.data.value1;
				document.forms[0].falg.value=falg;	
			},
			failure: function ( result, request) { 
				window.parent.alert("无法连接服务器和数据库，请和系统管理员联系！");
			} 
	    });
}

/**计算单价数量等于总价*/
function countquantity(){
var quantity = document.getElementById("quantity").value
var unit_price = document.getElementById("unit_price").value
var total_price;
if(quantity.length!=0&&unit_price.length!=0){
	document.getElementById("total_price").value=quantity*unit_price;
	}
}
function ShowFormTitle(strTitle)
{
	document.write("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"height:26px; background-position: left bottom; background-image: url(../../resource/image/FormTitle_A_4.gif); background-repeat: repeat-x;\">");
	document.write("  <tr >");
	document.write("	<td style=\"width:5px; background-position: left bottom; background-image: url(../../resource/image/FormTitle_A_1.gif); background-repeat: no-repeat;\">&nbsp;&nbsp;&nbsp;</td>");
	document.write("	<td class=\"FormTitle\" style=\"width:100%; padding-left:5px; padding-top:3px; background-position: left bottom; background-image: url(../../resource/image/FormTitle_A_2.gif); background-repeat: no-repeat;\">");
	document.write("		<span id=\"spanFormTitle\" class=\"SpanTitle\">"+ strTitle +"</span>");
	document.write("	</td>");
	document.write("	<td style=\"width:5px; background-position: right bottom; background-image: url(../../resource/image/FormTitle_A_3.gif); background-repeat: no-repeat;\">&nbsp;&nbsp;&nbsp;</td>");
    document.write("  </tr>");
	document.write("</table>");
}
function getbank_guaranty(){
	var bank_guaranty = document.getElementById("falg").value;
	document.getElementById("bank_guaranty").value=bank_guaranty;
	chack_bank_guaranty();
}
</script>
</head>

<body onLoad="getbank_guaranty();">
	<html:form method="post" action="/pages/F01/F010102.do">
		<html:hidden property="operationType" />
		<html:hidden property="errorFlag" />
		<html:hidden property="falg" />
		<html:hidden property="originally_manufacturing_order" />
		<html:hidden property="customer_code" />
		<!--Begin：表单标题-->
		<div class="DivBlock">
			<script language="javascript" type="text/javascript">
				ShowFormTitle("<bean:message key="F01.F010102"/>");

	</script>
		</div>
		<!--End：表单标题-->

		<!--Begin：表单主体区块-->
		<div class="DivBlock">
			<div class="DivWrap" style="display:block">
				<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
					<TR>
						<TD ALIGN="right" NOWRAP WIDTH="15%">
							<bean:message key="F010102.cotract_number" />
							<!--订单号码-->
						</TD>
						<TD ALIGN="left" NOWRAP WIDTH="18%">
							<html:text property="cotract_number" styleClass="MyText" />
							<span class="Need">*</span>
						</TD>
						<TD ALIGN="right" NOWRAP WIDTH="15%">
							<bean:message key="F010102.manufacturing_order" />
							<!--工作号-->
						</TD>
						<TD ALIGN="left" NOWRAP WIDTH="18%">
							<html:text property="manufacturing_order" styleClass="MyText"
								onchange="javascript:JudgmentSample()" />
							<span class="Need">*</span>
						</TD>
						<TD ALIGN="right" NOWRAP WIDTH="15%">
							<bean:message key="F010102.model" />
							<!--产品型号-->
						</TD>
						<TD ALIGN="left" NOWRAP WIDTH="19%">
							<html:text property="model" styleClass="MyText" />
							<span class="Need">*</span>
						</TD>
					</TR>
					<TR>
						<TD ALIGN="right" NOWRAP>
							<bean:message key="F010102.product_type" />
							<!--产品类别-->
						</TD>
						<TD ALIGN="left" NOWRAP>
							<html:select property="product_type" styleClass="MySelect"
								style="width:130">
								<html:optionsCollection property="list_t_product_type"
									value="CODE" label="NAME" />
							</html:select>
							<span class="Need">*</span>
						</TD>
						<TD ALIGN="right" NOWRAP>
							<bean:message key="F010102.customer_type" />
							<!--客户类别-->
						</TD>
						<TD ALIGN="left" NOWRAP>
							<html:select property="customer_type" styleClass="MySelect"
								style="width:130" onchange="javascript:chack_customer_type()">
								<html:optionsCollection property="list_c_customer_type"
									value="CODE" label="NAME" />
							</html:select>
							<span class="Need">*</span>
						</TD>
						<TD ALIGN="right" NOWRAP>
							<bean:message key="F010102.VAT" />
							<!--增值税率-->
						</TD>
						<TD ALIGN="left" NOWRAP>
							<html:text property="VAT" styleClass="MyText"
								style="text-align:right" />
							<span class="Need">*</span>
						</TD>
					</TR>
					<TR>
						<TD ALIGN="right" NOWRAP>
							<bean:message key="F010102.unit_price" />
							<!--单价-->
						</TD>
						<TD ALIGN="left" NOWRAP>
							<html:text property="unit_price" styleClass="MyText"
								style="text-align:right" onblur="countquantity(this)" />
							<span class="Need">￥*</span>
						</TD>
						<TD ALIGN="right" NOWRAP>
							<bean:message key="F010102.quantity" />
							<!--数量-->
						</TD>
						<TD ALIGN="left" NOWRAP>
							<html:text property="quantity" styleClass="MyText"
								onblur="countquantity(this)" />
							<span class="Need">*</span>
						</TD>
						<TD ALIGN="right" NOWRAP>
							<bean:message key="F010102.total_price" />
							<!--总价-->
						</TD>
						<TD ALIGN="left" NOWRAP>
							<html:text property="total_price" styleClass="MyText"
								style="text-align:right" readonly="true" />
							<span class="Need">*</span>
						</TD>
					</TR>
					<TR>
						<TD ALIGN="right" NOWRAP>
							<bean:message key="F010102.transport" />
							<!--运输成本-->
						</TD>
						<TD ALIGN="left" NOWRAP>
							<html:text property="transport" styleClass="MyText"
								style="text-align:right" />
							<span class="Need">*</span>
						</TD>
						<TD ALIGN="right" NOWRAP>
							<bean:message key="F010102.commission" />
							<!--佣金-->
						</TD>
						<TD ALIGN="left" NOWRAP>
							<html:text property="commission" styleClass="MyText"
								style="text-align:right" />
							<span class="Need">*</span>
						</TD>
						<TD ALIGN="right" NOWRAP>
							<bean:message key="F010102.payment_terms" />
							<!--付款方式-->
						</TD>
						<TD ALIGN="left" NOWRAP>
							<html:select property="payment_terms" styleClass="MySelect"
								style="width:130">
								<html:optionsCollection property="list_c_payment_terms"
									value="CODE" label="NAME" />
							</html:select>
							<span class="Need">*</span>
						</TD>
					</TR>
					<TR>
						<TD ALIGN="right" NOWRAP>
							<bean:message key="F010102.customer_code" />
							<!--客户名称-->
						</TD>
						<TD ALIGN="left" NOWRAP>
							<html:text property="customer_name" styleClass="MyText"
								onkeyup="FiltSupplier(this)" ondblclick="FiltSupplier(this)"
								style="position:relative" onblur="loseFocus('rtnList')" />
							<span class="Need">*</span>
						</TD>
						<TD ALIGN="right" NOWRAP>
							<bean:message key="F010102.customer_delivery_date" />
							<!--交货时间-->
						</TD>
						<TD ALIGN="left" NOWRAP>
							<html:text property="customer_delivery_date" styleClass="MyText"
								onclick="return CalendarClick(this)" />
							<span class="Need">*</span>
						</TD>
						<TD ALIGN="right" NOWRAP>
							<bean:message key="F010102.signaure_date" />
							<!--签订时间-->
						</TD>
						<TD ALIGN="left" NOWRAP>
							<html:text property="signaure_date" styleClass="MyText"
								onclick="return CalendarClick(this)" />
							<span class="Need">*</span>
						</TD>
					</TR>
					<TR>
						<TD ALIGN="right" NOWRAP>
							<bean:message key="F010102.bank_guaranty" />
							<!--是否担保-->
						</TD>
						<TD ALIGN="left" NOWRAP>
							<html:select property="bank_guaranty" styleClass="MySelect"
								onchange="javascript:chack_bank_guaranty()" style="width:130">
								<html:option value="1">是</html:option>
								<html:option value="0">否</html:option>
							</html:select>
							<span class="Need">*</span>
						</TD>
						<TD ALIGN="right" NOWRAP>

							<bean:message key="F010102.bond_date" />
							<!--担保时间-->
						</TD>
						<TD ALIGN="left" NOWRAP>
							<html:text property="bond_date" styleClass="MyText"
								onclick="return CalendarClick(this)" />
						</TD>
						<TD ALIGN="right" NOWRAP>
							<bean:message key="F010102.bond_value" />
						</TD>
						<TD ALIGN="left" NOWRAP>
							<html:text property="bond_value" styleClass="MyText"
								style="text-align:right" />
							<span class="Need">*</span>
						</TD>
					</TR>
					<TR>
						<TD ALIGN="right" NOWRAP>
							<bean:message key="F010102.area_group" />
							<!--地区分类-->
						</TD>
						<TD ALIGN="left" NOWRAP>
							<html:select property="area_group" styleClass="MySelect"
								style="width:130">
								<html:optionsCollection property="list_c_area_group"
									value="CODE" label="NAME" />
							</html:select>
							<span class="Need">*</span>
						</TD>
						<TD ALIGN="right" NOWRAP>
							<bean:message key="F010102.area" />
							<!--地区-->
						</TD>
						<TD ALIGN="left" NOWRAP>
							<html:text property="area" styleClass="MyText" />
							<span class="Need">*</span>
						</TD>
						<TD ALIGN="right" NOWRAP>
							<bean:message key="F010102.saleman_code" />
							<!--销售员名称-->
						</TD>
						<TD ALIGN="left" NOWRAP>
							<html:select property="saleman_code" styleClass="MySelect"
								style="width:130">
								<html:optionsCollection property="list_c_saleman" value="CODE"
									label="NAME" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							</html:select>
							<span class="Need">*</span>
						</TD>
					</TR>
					<TR>
						<TD ALIGN="right" NOWRAP>
							<bean:message key="F010102.own_production" />
							<!--是否自制品-->
						</TD>
						<TD ALIGN="left" NOWRAP>
							<html:select property="own_production" styleClass="MySelect"
								style="width:130">
								<html:option value="1">是</html:option>
								<html:option value="0">否</html:option>
							</html:select>
							<span class="Need">*</span>
						</TD>
						<TD ALIGN="right" NOWRAP>
							<bean:message key="F010102.passing_date" />
							<!--发送到技术部时间-->
						</TD>
						<TD ALIGN="left" NOWRAP>
							<html:text property="passing_date" styleClass="MyText"
								onclick="return CalendarClick(this)" />
							<span class="Need">*</span>
						</TD>
						<TD ALIGN="right" NOWRAP>
							&nbsp;

						</TD>
						<TD ALIGN="left" NOWRAP>
							&nbsp;

						</TD>
					<TR>
						<TD ALIGN="right" NOWRAP>
							<bean:message key="F010102.description" />
							<!--描述-->
						</TD>
						<TD ALIGN="left" NOWRAP colspan="3">
							<html:textarea property="description" styleClass="MyArea"
								rows="4" style="width:470"></html:textarea>
							<span class="Need">*</span>
						</TD>
					</TR>
				</TABLE>
			</div>
		</div>
		<!--End：表单主体区块-->

		<!--Begin：表单按钮及提示区-->
		<div class="DivBlock">
			<div class="DivButton">
				<input type="button" name="Submit1" class="MyButton"
					onClick="ShowAlert()" value="<bean:message key="common.save"/>">
				<input type="button" name="Submit2" class="MyButton"
					value="<bean:message key="common.back"/>"
					onClick="javascript:operation('back');">
			</div>
			<div class="DivPrompt" id="divPrompt" style="display:none">
			</div>
		</div>
		<!--End：表单按钮及提示区-->
		<%------------- -----------------------------------动态加载start----------------------------------------------------------------------%>
		<div id="rtnList"
			style="display: none; position:relative; overflow:auto; width:130px;"
			onmouseleave="col(this);initColumn()">
		</div>
		<%------------------------------------------------动态加载end----------------------------------------------------------------------%>
	</html:form>
</body>
</html:html>
<script language="javascript" type="text/javascript">
InitForm();
</script>
